import UIKit

extension QKC where AA == UIInterfaceOrientation {
    public func isPortrait_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isPortrait
	}

    public func isLandscape_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isLandscape
	}

}

@available(iOS 2.0, *)
extension QKC where AA :UIApplication {
     open func delegate_qk_s(_ delegate:  UIApplicationDelegate?) -> QKC<AA,YY,ZZ, UIApplicationDelegate?>{
		return link(next: delegate).then_QK { $0.value.delegate = delegate }
	}
     open func delegate_qk_g() -> QKC<AA,YY,ZZ, UIApplicationDelegate?>{
		 self +^ self.value.delegate
	}

		// returns YES if we are at least one deep in ignoring events
    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use UIView's userInteractionEnabled property instead")
    open func isIgnoringInteractionEvents_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isIgnoringInteractionEvents
	}

		// default is NO
    open func isIdleTimerDisabled_qk_s(_ isIdleTimerDisabled:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: isIdleTimerDisabled).then_QK { $0.value.isIdleTimerDisabled = isIdleTimerDisabled }
	}
    open func isIdleTimerDisabled_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isIdleTimerDisabled
	}

    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes")
    open func keyWindow_qk_g() -> QKC<AA,YY,ZZ, UIWindow? >{
		 self +^ self.value.keyWindow
	}

    open func windows_qk_g() -> QKC<AA,YY,ZZ, [UIWindow] >{
		 self +^ self.value.windows
	}

    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Provide a custom network activity UI in your app if desired.")
    open func isNetworkActivityIndicatorVisible_qk_s(_ isNetworkActivityIndicatorVisible:  Bool) -> QKC<AA,YY,ZZ, Bool>{
		return link(next: isNetworkActivityIndicatorVisible).then_QK { $0.value.isNetworkActivityIndicatorVisible = isNetworkActivityIndicatorVisible }
	}
    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Provide a custom network activity UI in your app if desired.")
    open func isNetworkActivityIndicatorVisible_qk_g() -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.isNetworkActivityIndicatorVisible
	}

		// default is UIStatusBarStyleDefault
    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use the statusBarManager property of the window scene instead.")
    open func statusBarStyle_qk_g() -> QKC<AA,YY,ZZ, UIStatusBarStyle >{
		 self +^ self.value.statusBarStyle
	}

    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use the statusBarManager property of the window scene instead.")
    open func isStatusBarHidden_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isStatusBarHidden
	}

    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use the interfaceOrientation property of the window scene instead.")
    open func statusBarOrientation_qk_g() -> QKC<AA,YY,ZZ, UIInterfaceOrientation >{
		 self +^ self.value.statusBarOrientation
	}

		// Returns the animation duration for the status bar during a 90 degree orientation change.  It should be doubled for a 180 degree orientation change.
    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use viewWillTransitionToSize:withTransitionCoordinator: instead.")
    open func statusBarOrientationAnimationDuration_qk_g() -> QKC<AA,YY,ZZ, TimeInterval >{
		 self +^ self.value.statusBarOrientationAnimationDuration
	}

		// returns CGRectZero if the status bar is hidden
    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use the statusBarManager property of the window scene instead.")
    open func statusBarFrame_qk_g() -> QKC<AA,YY,ZZ, CGRect >{
		 self +^ self.value.statusBarFrame
	}

		// set to 0 to hide. default is 0. In iOS 8.0 and later, your application must register for user notifications using -[UIApplication registerUserNotificationSettings:] before being able to set the icon badge.
    open func applicationIconBadgeNumber_qk_s(_ applicationIconBadgeNumber:  Int ) -> QKC<AA,YY,ZZ, Int >{
		return link(next: applicationIconBadgeNumber).then_QK { $0.value.applicationIconBadgeNumber = applicationIconBadgeNumber }
	}
    open func applicationIconBadgeNumber_qk_g() -> QKC<AA,YY,ZZ, Int >{
		 self +^ self.value.applicationIconBadgeNumber
	}

    @available(iOS 3.0, *)
    open func applicationSupportsShakeToEdit_qk_s(_ applicationSupportsShakeToEdit:  Bool) -> QKC<AA,YY,ZZ, Bool>{
		return link(next: applicationSupportsShakeToEdit).then_QK { $0.value.applicationSupportsShakeToEdit = applicationSupportsShakeToEdit }
	}
    @available(iOS 3.0, *)
    open func applicationSupportsShakeToEdit_qk_g() -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.applicationSupportsShakeToEdit
	}

    @available(iOS 4.0, *)
    open func applicationState_qk_g() -> QKC<AA,YY,ZZ, UIApplication.State >{
		 self +^ self.value.applicationState
	}

    @available(iOS 4.0, *)
    open func backgroundTimeRemaining_qk_g() -> QKC<AA,YY,ZZ, TimeInterval >{
		 self +^ self.value.backgroundTimeRemaining
	}

    @available(iOS 7.0, *)
    open func backgroundRefreshStatus_qk_g() -> QKC<AA,YY,ZZ, UIBackgroundRefreshStatus >{
		 self +^ self.value.backgroundRefreshStatus
	}

    @available(iOS 4.0, *)
    open func isProtectedDataAvailable_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isProtectedDataAvailable
	}

    @available(iOS 5.0, *)
    open func userInterfaceLayoutDirection_qk_g() -> QKC<AA,YY,ZZ, UIUserInterfaceLayoutDirection >{
		 self +^ self.value.userInterfaceLayoutDirection
	}

	// Return the size category
    @available(iOS 7.0, *)
    open func preferredContentSizeCategory_qk_g() -> QKC<AA,YY,ZZ, UIContentSizeCategory >{
		 self +^ self.value.preferredContentSizeCategory
	}

	// All of the currently connected UIScene instances
    @available(iOS 13.0, *)
    open func connectedScenes_qk_g() -> QKC<AA,YY,ZZ, Set<UIScene> >{
		 self +^ self.value.connectedScenes
	}

	// All of the representations that currently have connected UIScene instances or had their sessions persisted by the system (ex: visible in iOS' switcher)
    @available(iOS 13.0, *)
    open func openSessions_qk_g() -> QKC<AA,YY,ZZ, Set<UISceneSession> >{
		 self +^ self.value.openSessions
	}

	// returns YES if the application both declares multiple scene support in its info.plist and the executing environment allows multiple scenes for at least one system type. NO otherwise.
    @available(iOS 13.0, *)
    open func supportsMultipleScenes_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.supportsMultipleScenes
	}

		// nested. set should be set during animations & transitions to ignore touch and other events
    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use UIView's userInteractionEnabled property instead")
    open func beginIgnoringInteractionEvents_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.beginIgnoringInteractionEvents()
	}

    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use UIView's userInteractionEnabled property instead")
    open func endIgnoringInteractionEvents_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.endIgnoringInteractionEvents()
	}

    @available(iOS, introduced: 2.0, deprecated: 10.0)
    open func openURL_qk_f(_ url: URL) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.openURL(url)
	}

    @available(iOS 3.0, *)
    open func canOpenURL_qk_f(_ url: URL) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.canOpenURL(url)
	}

    

    open func sendEvent_qk_f(_ event: UIEvent) -> QKC<AA,YY,ZZ, UIEvent>{
		 self +^ self.value.sendEvent(event) +^ event
	}

    open func sendAction_qk_f(_ action: Selector, to target: Any?, from sender: Any?, for event: UIEvent?) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.sendAction(action, to:target, from:sender, for:event)
	}

	// orientations supported by this application.
    @available(iOS 6.0, *)
    open func supportedInterfaceOrientations_qk_f(for window: UIWindow?) -> QKC<AA,YY,ZZ,UIInterfaceOrientationMask>{
		 self +^ self.value.supportedInterfaceOrientations(for:window)
	}

    @available(iOS 4.0, *)
    open func beginBackgroundTask_qk_f(expirationHandler handler: (() -> Void)? = nil) -> QKC<AA,YY,ZZ,UIBackgroundTaskIdentifier>{
		 self +^ self.value.beginBackgroundTask(expirationHandler:handler)
	}

    @available(iOS 7.0, *)
    open func beginBackgroundTask_qk_f(withName taskName: String?, expirationHandler handler: (() -> Void)? = nil) -> QKC<AA,YY,ZZ,UIBackgroundTaskIdentifier>{
		 self +^ self.value.beginBackgroundTask(withName:taskName, expirationHandler:handler)
	}

    @available(iOS 4.0, *)
    open func endBackgroundTask_qk_f(_ identifier: UIBackgroundTaskIdentifier) -> QKC<AA,YY,ZZ, UIBackgroundTaskIdentifier>{
		 self +^ self.value.endBackgroundTask(identifier) +^ identifier
	}

    @available(iOS, introduced: 7.0, deprecated: 13.0, message: "Use a BGAppRefreshTask in the BackgroundTasks framework instead")
    open func setMinimumBackgroundFetchInterval_qk_f(_ minimumBackgroundFetchInterval: TimeInterval) -> QKC<AA,YY,ZZ, TimeInterval>{
		 self +^ self.value.setMinimumBackgroundFetchInterval(minimumBackgroundFetchInterval) +^ minimumBackgroundFetchInterval
	}

	// Providing a user activity will dispatch that activity to the provided session's scene. If no session is provided, then the system will select one (possibly creating a new session, if appropriate) and pass the activity to the session scene's delegate.
    @available(iOS 13.0, *)
    open func requestSceneSessionActivation_qk_f(_ sceneSession: UISceneSession?, userActivity: NSUserActivity?, options: UIScene.ActivationRequestOptions?, errorHandler: ((Error) -> Void)? = nil) -> QKC<AA,YY,ZZ, UISceneSession?>{
		 self +^ self.value.requestSceneSessionActivation(sceneSession, userActivity:userActivity, options:options, errorHandler:errorHandler) +^ sceneSession
	}

	// requests that a given session be closed, disconnecting the currently connected scene if present, and calling the -application:didDiscardSceneSessions: method on the application's delegate
    @available(iOS 13.0, *)
    open func requestSceneSessionDestruction_qk_f(_ sceneSession: UISceneSession, options: UISceneDestructionRequestOptions?, errorHandler: ((Error) -> Void)? = nil) -> QKC<AA,YY,ZZ, UISceneSession>{
		 self +^ self.value.requestSceneSessionDestruction(sceneSession, options:options, errorHandler:errorHandler) +^ sceneSession
	}

	// requests that any system UI representing a scene be updated due to background updates or any other relevant model/state update.
    @available(iOS 13.0, *)
    open func requestSceneSessionRefresh_qk_f(_ sceneSession: UISceneSession) -> QKC<AA,YY,ZZ, UISceneSession>{
		 self +^ self.value.requestSceneSessionRefresh(sceneSession) +^ sceneSession
	}

}

extension QKC where AA :UIApplication {
	// Returns YES if the application is currently registered for remote notifications, taking into account any systemwide settings; doesn't relate to connectivity.
    @available(iOS 8.0, *)
    open func isRegisteredForRemoteNotifications_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isRegisteredForRemoteNotifications
	}

	// Calling this will result in either application:didRegisterForRemoteNotificationsWithDeviceToken: or application:didFailToRegisterForRemoteNotificationsWithError: to be called on the application delegate. Note: these callbacks will be made only if the application has successfully registered for user notifications with registerUserNotificationSettings:, or if it is enabled for Background App Refresh.
    @available(iOS 8.0, *)
    open func registerForRemoteNotifications_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.registerForRemoteNotifications()
	}

    @available(iOS 3.0, *)
    open func unregisterForRemoteNotifications_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.unregisterForRemoteNotifications()
	}

    @available(iOS, introduced: 3.0, deprecated: 8.0, message: "Use -[UIApplication registerForRemoteNotifications] and UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:]")
    open func registerForRemoteNotifications_qk_f(matching types: UIRemoteNotificationType) -> QKC<AA,YY,ZZ, UIRemoteNotificationType>{
		 self +^ self.value.registerForRemoteNotifications(matching:types) +^ types
	}

	// Returns the enabled types, also taking into account any systemwide settings; doesn't relate to connectivity.
    @available(iOS, introduced: 3.0, deprecated: 8.0, message: "Use -[UIApplication isRegisteredForRemoteNotifications] and UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] to retrieve user-enabled remote notification and user notification settings")
    open func enabledRemoteNotificationTypes_qk_f() -> QKC<AA,YY,ZZ,UIRemoteNotificationType>{
		 self +^ self.value.enabledRemoteNotificationTypes()
	}

}

extension QKC where AA :UIApplication {
    @available(iOS, introduced: 4.0, deprecated: 10.0, message: "Use UserNotifications Framework's -[UNUserNotificationCenter getPendingNotificationRequestsWithCompletionHandler:]")
    open func scheduledLocalNotifications_qk_s(_ scheduledLocalNotifications:  [UILocalNotification]?) -> QKC<AA,YY,ZZ, [UILocalNotification]?>{
		return link(next: scheduledLocalNotifications).then_QK { $0.value.scheduledLocalNotifications = scheduledLocalNotifications }
	}
    @available(iOS, introduced: 4.0, deprecated: 10.0, message: "Use UserNotifications Framework's -[UNUserNotificationCenter getPendingNotificationRequestsWithCompletionHandler:]")
    open func scheduledLocalNotifications_qk_g() -> QKC<AA,YY,ZZ, [UILocalNotification]?>{
		 self +^ self.value.scheduledLocalNotifications
	}

    @available(iOS, introduced: 4.0, deprecated: 10.0, message: "Use UserNotifications Framework's -[UNUserNotificationCenter addNotificationRequest:withCompletionHandler:]")
    open func presentLocalNotificationNow_qk_f(_ notification: UILocalNotification) -> QKC<AA,YY,ZZ, UILocalNotification>{
		 self +^ self.value.presentLocalNotificationNow(notification) +^ notification
	}

		// copies notification
    @available(iOS, introduced: 4.0, deprecated: 10.0, message: "Use UserNotifications Framework's -[UNUserNotificationCenter addNotificationRequest:withCompletionHandler:]")
    open func scheduleLocalNotification_qk_f(_ notification: UILocalNotification) -> QKC<AA,YY,ZZ, UILocalNotification>{
		 self +^ self.value.scheduleLocalNotification(notification) +^ notification
	}

    @available(iOS, introduced: 4.0, deprecated: 10.0, message: "Use UserNotifications Framework's -[UNUserNotificationCenter removePendingNotificationRequestsWithIdentifiers:]")
    open func cancelLocalNotification_qk_f(_ notification: UILocalNotification) -> QKC<AA,YY,ZZ, UILocalNotification>{
		 self +^ self.value.cancelLocalNotification(notification) +^ notification
	}

    @available(iOS, introduced: 4.0, deprecated: 10.0, message: "Use UserNotifications Framework's -[UNUserNotificationCenter removeAllPendingNotificationRequests]")
    open func cancelAllLocalNotifications_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.cancelAllLocalNotifications()
	}

}

extension QKC where AA :UIApplication {
	// Returns the enabled user notification settings, also taking into account any systemwide settings.
    @available(iOS, introduced: 8.0, deprecated: 10.0, message: "Use UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] and -[UNUserNotificationCenter getNotificationCategoriesWithCompletionHandler:]")
    open func currentUserNotificationSettings_qk_g() -> QKC<AA,YY,ZZ, UIUserNotificationSettings? >{
		 self +^ self.value.currentUserNotificationSettings
	}

	// Registering UIUserNotificationSettings more than once results in previous settings being overwritten.
    @available(iOS, introduced: 8.0, deprecated: 10.0, message: "Use UserNotifications Framework's -[UNUserNotificationCenter requestAuthorizationWithOptions:completionHandler:] and -[UNUserNotificationCenter setNotificationCategories:]")
    open func registerUserNotificationSettings_qk_f(_ notificationSettings: UIUserNotificationSettings) -> QKC<AA,YY,ZZ, UIUserNotificationSettings>{
		 self +^ self.value.registerUserNotificationSettings(notificationSettings) +^ notificationSettings
	}

}

extension QKC where AA :UIApplication {
    @available(iOS 4.0, *)
    open func beginReceivingRemoteControlEvents_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.beginReceivingRemoteControlEvents()
	}

    @available(iOS 4.0, *)
    open func endReceivingRemoteControlEvents_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.endReceivingRemoteControlEvents()
	}

}

extension QKC where AA :UIApplication {
    @available(iOS, introduced: 5.0, deprecated: 9.0, message: "Newsstand apps now behave like normal apps on SpringBoard")
    open func setNewsstandIconImage_qk_f(_ image: UIImage?) -> QKC<AA,YY,ZZ, UIImage?>{
		 self +^ self.value.setNewsstandIconImage(image) +^ image
	}

}

extension QKC where AA :UIApplication {
	// Register shortcuts to display on the home screen, or retrieve currently registered shortcuts.
    @available(iOS 9.0, *)
    open func shortcutItems_qk_s(_ shortcutItems:  [UIApplicationShortcutItem]?) -> QKC<AA,YY,ZZ, [UIApplicationShortcutItem]?>{
		return link(next: shortcutItems).then_QK { $0.value.shortcutItems = shortcutItems }
	}
    @available(iOS 9.0, *)
    open func shortcutItems_qk_g() -> QKC<AA,YY,ZZ, [UIApplicationShortcutItem]?>{
		 self +^ self.value.shortcutItems
	}

}

extension QKC where AA :UIApplication {
	// If false, alternate icons are not supported for the current process.
    @available(iOS 10.3, *)
    open func supportsAlternateIcons_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.supportsAlternateIcons
	}

	// If `nil`, the primary application icon is being used.
    @available(iOS 10.3, *)
    open func alternateIconName_qk_g() -> QKC<AA,YY,ZZ, String? >{
		 self +^ self.value.alternateIconName
	}

	// Pass `nil` to use the primary application icon. The completion handler will be invoked asynchronously on an arbitrary background queue; be sure to dispatch back to the main queue before doing any further UI work.
    @available(iOS 10.3, *)
    open func setAlternateIconName_qk_f(_ alternateIconName: String?, completionHandler: ((Error?) -> Void)? = nil) -> QKC<AA,YY,ZZ, String?>{
		 self +^ self.value.setAlternateIconName(alternateIconName, completionHandler:completionHandler) +^ alternateIconName
	}

}

extension QKC where AA :UIApplication {
	// have been caused by a bad restoration archive and arrange to ignore it on a subsequent application launch.
    @available(iOS 6.0, *)
    open func extendStateRestoration_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.extendStateRestoration()
	}

    @available(iOS 6.0, *)
    open func completeStateRestoration_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.completeStateRestoration()
	}

	// This should only be called from methods invoked from State Preservation, else it is ignored.
    @available(iOS 7.0, *)
    open func ignoreSnapshotOnNextApplicationLaunch_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.ignoreSnapshotOnNextApplicationLaunch()
	}

}

extension QKC where AA :UIApplication {
    @available(iOS, introduced: 2.0, deprecated: 9.0, message: "Explicit setting of the status bar orientation is more limited in iOS 6.0 and later")
    open func setStatusBarOrientation_qk_f(_ interfaceOrientation: UIInterfaceOrientation, animated: Bool) -> QKC<AA,YY,ZZ, UIInterfaceOrientation>{
		 self +^ self.value.setStatusBarOrientation(interfaceOrientation, animated:animated) +^ interfaceOrientation
	}

    @available(iOS, introduced: 2.0, deprecated: 9.0, message: "Use -[UIViewController preferredStatusBarStyle]")
    open func setStatusBarStyle_qk_f(_ statusBarStyle: UIStatusBarStyle, animated: Bool) -> QKC<AA,YY,ZZ, UIStatusBarStyle>{
		 self +^ self.value.setStatusBarStyle(statusBarStyle, animated:animated) +^ statusBarStyle
	}

    @available(iOS, introduced: 3.2, deprecated: 9.0, message: "Use -[UIViewController prefersStatusBarHidden]")
    open func setStatusBarHidden_qk_f(_ hidden: Bool, with animation: UIStatusBarAnimation) -> QKC<AA,YY,ZZ, Bool>{
		 self +^ self.value.setStatusBarHidden(hidden, with:animation) +^ hidden
	}

    @available(iOS, introduced: 4.0, deprecated: 9.0, message: "Please use PushKit for VoIP applications instead of calling this method")
    open func setKeepAliveTimeout_qk_f(_ timeout: TimeInterval, handler keepAliveHandler: (() -> Void)? = nil) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.setKeepAliveTimeout(timeout, handler:keepAliveHandler)
	}

    @available(iOS, introduced: 4.0, deprecated: 9.0, message: "Please use PushKit for VoIP applications instead of calling this method")
    open func clearKeepAliveTimeout_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.clearKeepAliveTimeout()
	}

}

